//
//  YSGMyopiaReserveResultController.swift
//  EyeVisionForPatients
//
//  Created by PMC on 2021/1/5.
//  Copyright © 2021 QDSG. All rights reserved.
//

import UIKit

/// 预约结果
class YSGMyopiaReserveResultController: BaseViewController {
    
    @IBOutlet weak var patientNameLabel: UILabel!
    @IBOutlet weak var checkTypeLabel: UILabel!
    @IBOutlet weak var checkProjectLabel: UILabel!
    @IBOutlet weak var hospitalNameLabel: UILabel!
    @IBOutlet weak var checkTimeLabel: UILabel!
    
    let viewModel: MyopiaReserveViewModel
    
    init(viewModel: MyopiaReserveViewModel) {
        self.viewModel = viewModel
        super.init(nibName: nil, bundle: nil)
    }
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    override func viewDidLoad() {
        super.viewDidLoad()
        title = "预约结果"
        handleReserveResult()
    }
    
    // MARK: - Target
    @IBAction func confirmBtnAction(_ sender: UIButton) {
        navigationController?.popTo(target: YSGMyopiaControlController.self)
    }
    
    func handleReserveResult() {
        patientNameLabel.text = viewModel.model.applyPatname
        checkTypeLabel.text = viewModel.model.checkSeries
        checkProjectLabel.text = viewModel.checkProjectSelected.name
        hospitalNameLabel.text = viewModel.model.applyHosname
        checkTimeLabel.text = viewModel.model.applyCheckTime
    }
    

}
